package com.example.qihuibao.widget.dialog

import android.widget.TextView
import com.example.qihuibao.R
import com.example.qihuibao.base.BaseDialogFragment

/**
 *@author: cww
 *@desc:
 *@date: 5/16/23 10:58 AM
 */
class LoadingDialog(val text:String="") : BaseDialogFragment(R.layout.dialog_loading) {

//    override fun initDialog(): Dialog {
//        val dialog = super.initDialog()
//        val window = dialog.window
//        window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))//透明背景
//        return dialog
//    }

    override fun initView() {
//        mView?.findViewById<Button>(R.id.btn_cancel)?.setOnClickListener { dismiss() }
        if (text.isNotBlank()) {
            mView?.findViewById<TextView>(R.id.tv_text)?.text = text
        }
    }

//    private fun setValue() {
//        val value = mView?.findViewById<EditText>(R.id.et_value)?.text.toString()
//        if (HttpUtil.isHttpOrHttps(value)) {
//            requireActivity().toast2(resources.getString(R.string.input_guifan))
//            return
//        }
//        valueBack(value)
//    }

}